home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / NotePads / PhoneSlip / Source / colorView.m < prev    next >
Encoding:
Text File  |  1993-09-21  |  561 b   |  33 lines

  1.  
  2. /* Copyright(C) 1993, The MITRE Corporation */
  3.  
  4. #import "colorView.h"
  5.  
  6. @implementation colorView
  7.  
  8. - setBackgroundColor:(NXColor)color 
  9. {
  10.     viewColor = color;
  11.     return self;
  12. }
  13.  
  14. - setBackgroundGray:(float)gray
  15. {
  16.     viewColor = NXConvertRGBAToColor( gray, gray, gray, 1.0);
  17.     return self;
  18.  
  19. - drawSelf:(const NXRect *)rects :(int)rectCount
  20. {
  21.     NXRect frameRect;
  22.     [self getFrame:&frameRect];
  23.     [self convertRectFromSuperview:&frameRect];
  24.     NXSetColor(viewColor);
  25.     NXRectFill(&frameRect);
  26.     NXFrameRect(&frameRect);
  27.     return self;
  28. }
  29.  
  30.  
  31. @end
  32.